Skip to content

feat: implement progress bar for export all #115

Merged
amemya merged 6 commits into
mainfrom
feat/issue-110-progress-bar
Jun 24, 2026
Merged

feat: implement progress bar for export all #115
amemya merged 6 commits into
mainfrom
feat/issue-110-progress-bar

Conversation

@amemya

@amemya amemya commented Jun 24, 2026

Copy link
Copy Markdown
Owner

resolved #110

書き出しの進捗を表示するプログレスバーを実装

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c8a67eea-1153-47a7-a891-32712871015a

📥 Commits

Reviewing files that changed from the base of the PR and between e4fa7fd and d803733.

📒 Files selected for processing (1)
  • frontend/src/hooks/useExport.ts

📝 Walkthrough

Summary by CodeRabbit

  • 新機能

    • エクスポートの進捗を画面上で確認できるようになりました。
    • 進捗中は、件数とバー付きの表示が優先され、完了までの状況が分かりやすくなりました。
  • 改善

    • 画像の一括エクスポート中に、各ファイルの処理状況が順次反映されるようになりました。
    • 進捗表示に問題があっても、エクスポート処理自体が止まりにくくなりました。

Walkthrough

useExport に進捗通知コールバックを追加し、画像ごとの処理進行を開始・更新・終了時に送るようにした。App は進捗を state で受け取り、エクスポート中はヘッダーに進捗表示付きボタンを優先表示する。

Changes

エクスポート進捗表示

Layer / File(s) Summary
進捗通知と表示切り替え
frontend/src/hooks/useExport.ts, frontend/src/App.tsx
UseExportPropsonProgress を追加し、downloadAllImages で開始・各画像完了・終了時に通知する。AppexportProgress を更新し、エクスポート中はヘッダーで進捗表示付きボタンを優先表示する。

推定コードレビュー工数

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは export all の進捗バー追加という主変更を簡潔に表しています。
Description check ✅ Passed 説明は進捗を表示するプログレスバー実装と一致しています。
Linked Issues check ✅ Passed 画像処理の進捗が見えないという #110 の要件に対し、進捗バー表示と進捗通知追加で対応しています。
Out of Scope Changes check ✅ Passed 例外保護の追加は付随的ですが、進捗表示の実装に関連しており逸脱ではありません。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-110-progress-bar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/hooks/useExport.ts`:
- Around line 124-126: The onProgress callback is being called directly at
multiple locations throughout the useExport hook without exception handling, and
the cleanup operations (setIsSelecting(false) and isSelectingRef.current =
false) are not guaranteed to execute if onProgress throws an exception. Wrap all
direct calls to onProgress in try/catch blocks to isolate any callback
exceptions, and ensure that the cleanup logic for setIsSelecting and
isSelectingRef.current is moved into a finally block so it executes regardless
of whether the onProgress callback succeeds or fails. This applies to the
onProgress calls at the initial progress notification, the intermediate progress
updates, and the final completion notification to prevent operation locks from
remaining active when the callback fails.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2b5905b5-a8fc-4f69-ae9d-26382a305255

📥 Commits

Reviewing files that changed from the base of the PR and between 9b08f7e and 7707c8d.

📒 Files selected for processing (2)
  • frontend/src/App.tsx
  • frontend/src/hooks/useExport.ts

Comment thread frontend/src/hooks/useExport.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/hooks/useExport.ts`:
- Line 204: 進捗更新が失敗時のcontinue経路で抜け落ちています。useExport.ts の import ループ内で
safeOnProgress を呼んでいる箇所を見直し、Line 154 / Line 180 の失敗分岐でも必ず実行されるように、同じループの
try/finally の finally 側へ移動してください。これにより importedImages.length
を基準にした進捗表示が各画像処理後に必ず更新されます。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bba58bef-8dba-4359-a31e-fe3a06907ad4

📥 Commits

Reviewing files that changed from the base of the PR and between 7707c8d and e4fa7fd.

📒 Files selected for processing (1)
  • frontend/src/hooks/useExport.ts

Comment thread frontend/src/hooks/useExport.ts Outdated
@amemya

amemya commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@amemya amemya merged commit e159f1a into main Jun 24, 2026
4 checks passed
@amemya amemya deleted the feat/issue-110-progress-bar branch June 24, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

プログレスバーの実装

1 participant